// 管理员登录接口
const express = require('express');
const router = express.Router();
const db = require('../../db/connect');
const jwt = require('jsonwebtoken')
const xzid = require('xzid')

router.get('/student/LoginInfo', (req, res) => {

    // 传入参数 账户、密码
    // post   body
    const { id } = req.query;
    
    console.log(id)
    const sql = ` select * from manger_student where student_id = ?`;
    db(sql,[id] ,(err, data) => {
        if (data.length>0) {
           res.send({
                code:200,
                data,
           })
        } else {
            res.send({
                code: 400,
                content: err,
                message: '告诉他账户不存在'
            })
        }
    })
})
module.exports = router